package com.kt.coroutinedemo.Netty

import io.netty.handler.codec.LengthFieldBasedFrameDecoder

/**
 * @Author Xzh
 * @Date 2025/8/22
 * @Description
 */
class KtLengthFieldBasedFrameDecoder() : LengthFieldBasedFrameDecoder(
    MaxFrameLength,
    LengthFieldOffset,
    LengthFieldLength,
    LengthAdjustment,
    InitialBytesToStrip
) {
    companion object{
        // 最大帧长度
      private  val MaxFrameLength = 1024 * 1024 * 6
        // 长度字段的偏移量
        val LengthFieldOffset = 3
        // 长度字段的长度
        val LengthFieldLength = 2
        //长度调整值
        val LengthAdjustment = 0
        //解码后跳过的字节数(需要完整的报数据，不跳过任何数据)
        val InitialBytesToStrip = 0


    }
}